package com.atguigu.springcloud.service;

import org.springframework.stereotype.Component;

/**
 * Feign接口调用添加默认降级处理，注意要放入容器扫描，并yml添加配置  eureka.hystrix.enable = true
 *
 * @author Tu
 * @date 2023/7/16 16:01
 */
@Component
public class PaymentFollBackService implements PaymentHystrixService {

    @Override
    public String paymentInfoSuccess(Integer id) {
        return "支付成功接口，调用失败，请稍后重试！";
    }

    @Override
    public String paymentInfoError(Integer id) {
        return "支付超时接口，调用失败，请稍后重试！";
    }

}
